gridpack::powerflow::PFAppModule Class Reference

#include <pf_app_module.hpp>

Collaboration diagram for gridpack::powerflow::PFAppModule:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PFAppModule (void)
 ~PFAppModule (void)
void readNetwork (boost::shared_ptr< PFNetwork > &network, gridpack::utility::Configuration *config)
void initialize ()
void reload ()
bool solve ()
bool nl_solve ()
void write ()
void writeBus (const char *signal)
void writeBranch (const char *signal)
void writeCABus ()
void writeCABranch ()
void writeHeader (const char *msg)
std::vector< std::string > writeBusString (const char *signal=NULL)
std::vector< std::string > writeBranchString (const char *signal=NULL)
void open (const char *filename)
void close ()
void print (const char *buf)
void saveData ()
void exportPSSE33 (std::string &filename)
bool setContingency (Contingency &event)
bool unSetContingency (Contingency &event)
void setVoltageLimits (double Vmin, double Vmax)
bool checkVoltageViolations ()
bool checkVoltageViolations (int area)
void ignoreVoltageViolations ()
void clearVoltageViolations ()
bool checkLineOverloadViolations ()
bool checkLineOverloadViolations (int area)
bool checkLineOverloadViolations (std::vector< int > &bus1, std::vector< int > &bus2, std::vector< std::string > &tags, std::vector< bool > &violations)
void ignoreLineOverloadViolations ()
void clearLineOverloadViolations ()
bool checkQlimViolations ()
bool checkQlimViolations (int area)
void clearQlimViolations ()
void resetVoltages ()
void scaleGeneratorRealPower (double scale, int area, int zone)
void scaleLoadPower (double scale, int area, int zone)
double getTotalLoadRealPower (int area, int zone)
void getGeneratorMargins (int area, int zone, double *total, double *pmin, double *pmax)
void resetPower ()
void writeRTPRDiagnostics (int src_area, int src_zone, int load_area, int load_zone, double gen_scale, double load_scale, const char *file)
std::vector< std::string > getContingencyFailures ()
void useRateB (bool flag)

Constructor & Destructor Documentation

gridpack::powerflow::PFAppModule::PFAppModule ( void   ) 

Basic constructor

gridpack::powerflow::PFAppModule::~PFAppModule ( void   ) 

Basic destructor


Member Function Documentation

bool gridpack::powerflow::PFAppModule::checkLineOverloadViolations ( std::vector< int > &  bus1,
std::vector< int > &  bus2,
std::vector< std::string > &  tags,
std::vector< bool > &  violations 
)
bool gridpack::powerflow::PFAppModule::checkLineOverloadViolations ( int  area  ) 
bool gridpack::powerflow::PFAppModule::checkLineOverloadViolations (  ) 

Check to see if there are any line overload violations in the network. The last call checks for overloads on specific lines.

Parameters:
area only check for violations in specified area
bus1 original index of "from" bus for branch
bus2 original index of "to" bus for branch
tags line IDs for individual lines
violations true if violation detected on branch, false otherwise
Returns:
true if no violations found
bool gridpack::powerflow::PFAppModule::checkQlimViolations ( int  area  ) 
bool gridpack::powerflow::PFAppModule::checkQlimViolations (  ) 

Check to see if there are any Q limit violations in the network

Parameters:
area only check for violations in specified area
Returns:
true if no violations found
bool gridpack::powerflow::PFAppModule::checkVoltageViolations ( int  area  ) 
bool gridpack::powerflow::PFAppModule::checkVoltageViolations (  ) 

Check to see if there are any voltage violations in the network.

Parameters:
area only check for violations in specified area
Returns:
true if no violations found
void gridpack::powerflow::PFAppModule::clearLineOverloadViolations (  ) 

Clear "ignore" parameter on all lines

void gridpack::powerflow::PFAppModule::clearQlimViolations (  ) 

Clear changes that were made for Q limit violations and reset system to its original state

void gridpack::powerflow::PFAppModule::clearVoltageViolations (  ) 

Clear "ignore" parameter on all buses

void gridpack::powerflow::PFAppModule::close (  ) 
void gridpack::powerflow::PFAppModule::exportPSSE33 ( std::string &  filename  ) 

Export final configuration to PSS/E formatted file

Parameters:
filename name of file to store network configuration
std::vector<std::string> gridpack::powerflow::PFAppModule::getContingencyFailures (  ) 

Get strings documenting contingency failures. Strings are *not* terminated with a carriage return

void gridpack::powerflow::PFAppModule::getGeneratorMargins ( int  area,
int  zone,
double *  total,
double *  pmin,
double *  pmax 
)

Return the current real power generation and the maximum and minimum total power generation for all generators in the zone. If zone is less than 1 then return values for all generators in the area

Parameters:
area index of area
zone index of zone
total total real power generation
pmin minimum allowable real power generation
pmax maximum available real power generation
double gridpack::powerflow::PFAppModule::getTotalLoadRealPower ( int  area,
int  zone 
)

Return the total real power load for all loads in the zone. If zone less than 1, then return the total load real power for the area

Parameters:
area index of area
zone index of zone
Returns:
total load
void gridpack::powerflow::PFAppModule::ignoreLineOverloadViolations (  ) 

Set "ignore" paramter on all lines with violations so that subsequent checks are not counted as violations

void gridpack::powerflow::PFAppModule::ignoreVoltageViolations (  ) 

Set "ignore" parameter on all buses with violations so that subsequent checks are not counted as violations

void gridpack::powerflow::PFAppModule::initialize (  ) 

Set up exchange buffers and other internal parameters and initialize network components using data from data collection

bool gridpack::powerflow::PFAppModule::nl_solve (  ) 

Execute the iterative solve portion of the application using a library non-linear solver

Returns:
false if an error was caught in the solution algorithm
void gridpack::powerflow::PFAppModule::open ( const char *  filename  ) 

Redirect output from standard out

Parameters:
filename name of file to write results to
void gridpack::powerflow::PFAppModule::print ( const char *  buf  ) 

Print string. This can be used to direct output to the file opened using the open command

Parameters:
buf string to be printed
void gridpack::powerflow::PFAppModule::readNetwork ( boost::shared_ptr< PFNetwork > &  network,
gridpack::utility::Configuration config 
)

Read in and partition the powerflow network. The input file is read directly from the Powerflow block in the configuration file so no external file names or parameters need to be passed to this routine

Parameters:
network pointer to a PFNetwork object. This should not have any buses or branches defined on it.
config point to open configuration file
void gridpack::powerflow::PFAppModule::reload (  ) 

Reinitialize calculation from data collections

void gridpack::powerflow::PFAppModule::resetPower (  ) 

Reset power of loads and generators to original values

void gridpack::powerflow::PFAppModule::resetVoltages (  ) 

Reset voltages to values in network configuration file

void gridpack::powerflow::PFAppModule::saveData (  ) 

Save results of powerflow calculation to data collection objects

void gridpack::powerflow::PFAppModule::scaleGeneratorRealPower ( double  scale,
int  area,
int  zone 
)

Scale generator real power. If zone less than 1 then scale all generators in the area.

Parameters:
scale factor to scale real power generation
area index of area for scaling generation
zone index of zone for scaling generation
void gridpack::powerflow::PFAppModule::scaleLoadPower ( double  scale,
int  area,
int  zone 
)

Scale load power. If zone less than 1 then scale all loads in the area.

Parameters:
scale factor to scale load real power
area index of area for scaling load
zone index of zone for scaling load
bool gridpack::powerflow::PFAppModule::setContingency ( Contingency event  ) 

Set a contingency

Parameters:
event data describing location and type of contingency
Returns:
false if location of contingency is not found in network
void gridpack::powerflow::PFAppModule::setVoltageLimits ( double  Vmin,
double  Vmax 
)

Set voltage limits on all buses

Parameters:
Vmin lower bound on voltages
Vmax upper bound on voltages
bool gridpack::powerflow::PFAppModule::solve (  ) 

Execute the iterative solve portion of the application using a hand-coded Newton-Raphson solver

Returns:
false if an error was caught in the solution algorithm
bool gridpack::powerflow::PFAppModule::unSetContingency ( Contingency event  ) 

Return system to the state before the contingency

Parameters:
event data describing location and type of contingency
Returns:
false if location of contingency is not found in network
void gridpack::powerflow::PFAppModule::useRateB ( bool  flag  ) 

User rate B parameter for line overload violations

Parameters:
flag if true, use RATEB parameter
void gridpack::powerflow::PFAppModule::write (  ) 

Write out results of powerflow calculation to standard output Separate calls for writing only data from buses or branches

Parameters:
signal tell underlying write what records to print
void gridpack::powerflow::PFAppModule::writeBranch ( const char *  signal  ) 
std::vector<std::string> gridpack::powerflow::PFAppModule::writeBranchString ( const char *  signal = NULL  ) 
void gridpack::powerflow::PFAppModule::writeBus ( const char *  signal  ) 
std::vector<std::string> gridpack::powerflow::PFAppModule::writeBusString ( const char *  signal = NULL  ) 
void gridpack::powerflow::PFAppModule::writeCABranch (  ) 
void gridpack::powerflow::PFAppModule::writeCABus (  ) 
void gridpack::powerflow::PFAppModule::writeHeader ( const char *  msg  ) 
void gridpack::powerflow::PFAppModule::writeRTPRDiagnostics ( int  src_area,
int  src_zone,
int  load_area,
int  load_zone,
double  gen_scale,
double  load_scale,
const char *  file 
)

Write real time path rating diagnostics

Parameters:
src_area generation area
src_zone generation zone
load_area load area
load_zone load zone
gen_scale scale factor for generation
load_scale scale factor for loads
file name of file containing diagnostics

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1